package Send2ME::Personal;

use Send2ME::Dao::Auth;
use Send2ME::Dao::Rule;

use Dancer ':syntax';
prefix '/personal';

get '/' => sub {
	if (credential->{logged_in}) {
		my @rules = getRule({user_id => credential->{user}->{id}});		
		template 'personal-page', { 
			credential => credential,
			rules => \@rules 
		};
	} else {
		redirect '/';
	}
};

1;